package com.yan.token.repository;

import com.yan.token.module.App;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import java.util.Collection;

/**
 * @author yanheng
 * @data 2020/1/3 14:28
 */
public interface AppRepository {
    App findByAppId(String appId);

    @Cacheable("AppCache")
    App findById(String id);

    @CachePut("AppCache")
    void save(App app);

    Collection<App> findAll();

    void deleteById(String id);
}
